
package net.swa.dewei.service;

import java.util.List;
import java.util.Map;

import net.swa.dewei.beans.entity.DingDanCard;
import net.swa.dewei.beans.entity.LifeGoods;
import net.swa.dewei.beans.vo.VoListPage;
import net.swa.util.JsonResult;

public interface LifeGoodsService
{

    LifeGoods queryById(Long id);

    JsonResult<LifeGoods> queryPage(String name , String pinpai , String guige , int currentPage , int pageSize , String orderBy , String orderType);

    boolean add(LifeGoods model);

    boolean update(LifeGoods model);

    Map<String, Object> batchUpdateXiajia(Long[] ids);

    Map<String, Object> updateState(Long id , Integer status);

    List<LifeGoods> queryList(String name , int status , int max);

    VoListPage<LifeGoods> queryVoList(String name , int statusYes , int maxnum);

    VoListPage<LifeGoods> queryVoListByLastId(String name , int status , int max , long id);

    /**
     * 查询商品列表并附上相应的购买数量
     * @param ids
     * @param buyNums
     * @return
     */
    List<LifeGoods> queryBuyList(Long[] ids , Integer[] buyNums);

    /**
     * 保存订单数据
     * @param d
     * @param ids
     * @param buyNums
     * @param cardPaytypeSm
     * @return
     */
    DingDanCard saveDingdanModel(DingDanCard d , Long[] ids , Integer[] buyNums , String cardPaytypeSm);

}
